﻿@model ScmSafetyconstructiondicViewModel
@{
    Layout = null;
    ViewBag.Title = "字典项-首页";
    int j = 0;
}

<script type="text/javascript">
    var xtgl_zdgl_zTree2;
    var setting = {
        treeObjId: "xtgl_zdgl_zTree2",
        isSimpleData: true,              //数据是否采用简单 Array 格式，默认false
        treeNodeKey: "id",               //在isSimpleData格式下，当前节点id属性
        treeNodeParentKey: "pId",        //在isSimpleData格式下，当前节点的父节点id属性
        showLine: true,                  //是否显示节点间的连线
        checkable: false,                  //每个节点上是否显示 CheckBox
        callback: {
            nodeCreated: xtgl_zdgl_zTree2_creat    //这是节点生成时的回调函数
        }
    };
    function xtgl_zdgl_zTree2_creat(event, treeId, treeNode) {
        if (treeNode.pId != null) {
            $("#" + treeNode.tId + "_a").attr("rel", "xtgl_zdgl_list2");
        }
    }
    $(function () {
        $.getJSON(
           "/PersonnelLog/ScmSafetyConstructionDic/GetDicJson?pids=F24676CA-1940-4629-97DD-D555D1917D12&url=/PersonnelLog/ScmSafetyConstructionDic/SafetyConstructionDicList",
           function (data) {
               xtgl_zdgl_zTree2 = $("#xtgl_zdgl_zTree2").zTree(setting, data);
               xtgl_zdgl_zTree2.expandAll(true);
               $("#xtgl_zdgl_zTree2").initUI();
               $("#xtgl_zdgl_zTree2>li:eq(0)>ul>li:eq(0)>a>button").click();
           });
    });
</script>
<div class="pageContent" style="padding: 5px">
    <div layouth="11" style="float: left; display: block; overflow: auto; width: 170px; border: solid 1px #CCC; line-height: 21px; background: #fff">
        <ul id="xtgl_zdgl_zTree2" class="ztree"></ul>
    </div>

    <div id="xtgl_zdgl_list2" class="unitBox" style="margin-left: 176px;">
        <!--#include virtual="list1.html" -->
    </div>
</div>





